package com.southwind.common;

import com.southwind.entity.Admin;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class ResultObj {

    public static final ResultObj LOGIN_ERROR_LOGINNAME = new ResultObj(-1, "用户名错误");
    public static final ResultObj LOGIN_ERROR_PASSWORD = new ResultObj(-1, "密码错误");
    public static final ResultObj LOGIN_ERROR_CODE = new ResultObj(-1, "验证码错误");

    public static final ResultObj LOGIN_SUCCESS = new ResultObj(0, "登录成功");

    public static final ResultObj ORDER_ADD_SUCCESS = new ResultObj(0, "订单添加成功");
    public static final ResultObj ORDER_ADD_ERROR = new ResultObj(-1, "订单添加失败");

    public static final ResultObj CLASS_ADD_SUCCESS = new ResultObj(0, "课程添加成功");
    public static final ResultObj CLASS_ADD_ERROR = new ResultObj(-1, "课程添加失败");
    public static final ResultObj CLASS_UPDATE_SUCCESS = new ResultObj(0, "课程修改成功");
    public static final ResultObj CLASS_UPDATE_ERROR = new ResultObj(-1, "课程修改失败");
    public static final ResultObj CLASS_DELETE_SUCCESS = new ResultObj(0, "课程删除成功");
    public static final ResultObj CLASS_DELETE_ERROR = new ResultObj(-1, "课程删除失败");

    public static final ResultObj EMPLOYEE_ADD_SUCCESS = new ResultObj(0, "员工添加成功");
    public static final ResultObj EMPLOYEE_ADD_ERROR = new ResultObj(-1, "员工添加失败");
    public static final ResultObj EMPLOYEE_UPDATE_SUCCESS = new ResultObj(0, "员工修改成功");
    public static final ResultObj EMPLOYEE_UPDATE_ERROR = new ResultObj(-1, "员工修改失败");
    public static final ResultObj EMPLOYEE_DELETE_SUCCESS = new ResultObj(0, "员工删除成功");
    public static final ResultObj EMPLOYEE_DELETE_ERROR = new ResultObj(-1, "员工删除失败");

    public static final ResultObj EQUIPMENT_ADD_SUCCESS = new ResultObj(0, "器械添加成功");
    public static final ResultObj EQUIPMENT_ADD_ERROR = new ResultObj(-1, "器械添加失败");
    public static final ResultObj EQUIPMENT_UPDATE_SUCCESS = new ResultObj(0, "器械修改成功");
    public static final ResultObj EQUIPMENT_UPDATE_ERROR = new ResultObj(-1, "器械修改失败");
    public static final ResultObj EQUIPMENT_DELETE_SUCCESS = new ResultObj(0, "器械删除成功");
    public static final ResultObj EQUIPMENT_DELETE_ERROR = new ResultObj(-1, "器械删除失败");

    public static final ResultObj MEMBER_ADD_SUCCESS = new ResultObj(0, "会员添加成功");
    public static final ResultObj MEMBER_ADD_ERROR = new ResultObj(-1, "会员添加失败");
    public static final ResultObj MEMBER_UPDATE_SUCCESS = new ResultObj(0, "会员修改成功");
    public static final ResultObj MEMBER_UPDATE_ERROR = new ResultObj(-1, "会员修改失败");
    public static final ResultObj MEMBER_DELETE_SUCCESS = new ResultObj(0, "会员删除成功");
    public static final ResultObj MEMBER_DELETE_ERROR = new ResultObj(-1, "会员删除失败");

    private Integer code;
    private String msg;
    private Admin user;

    public ResultObj(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
